import time
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.action_chains import ActionChains

from selenium.webdriver.support.ui import WebDriverWait as Ec
from selenium.webdriver.support.wait import WebDriverWait

#Ngqyabdsctyocigf qq授权码
class Testcase():
    driver = webdriver.Chrome()
    driver.get('https://www.jiuxian.com/')
    driver.maximize_window()
    driver.find_element(By.XPATH,'/html/body/div[2]/div/div[1]/div/a[1]').click()
    time.sleep(3)
    dy1 = driver.find_element(By.XPATH,'//*[@id="loginform"]/div/div/div/div/div[1]/div[1]/a[1]').text
    print('文本断言1',dy1)
    assert dy1 ==  '帐号登录'
    driver.find_element(By.NAME,'uname').send_keys('18615488780')
    driver.find_element(By.NAME,'_pwd').send_keys('lr123456.')
    time.sleep(10)
    driver.find_element(By.XPATH,'//*[@id="save"]').click()
    time.sleep(2)
    driver.find_element(By.XPATH,'//*[@id="bindSub"]').click()
    time.sleep(5)
    driver.find_element(By.XPATH,'//*[@id="wd"]').send_keys('五粮液')
    driver.find_element(By.XPATH,'/html/body/div[4]/div/div[2]/div[1]/form/input[2]').click()
